package com.sc.nft.util;

/**
 * @author zlikun
 * @since 2024/05/31
 */
public class TableNameContext {

    private static final ThreadLocal<String> TABLE_NAME_THREAD_LOCAL = new ThreadLocal<>();

    public static void setPartition(String partition) {
        TABLE_NAME_THREAD_LOCAL.set(partition);
    }

    public static String getPartition() {
        return TABLE_NAME_THREAD_LOCAL.get();
    }

    public static void clear() {
        TABLE_NAME_THREAD_LOCAL.remove();
    }

}

